mod data_connector;
mod data_extractor_statement;
mod sql;

use std::sync::{Arc, Mutex};

use model_graph_types::{
    container::workflow::{
         DataOperatorStatement, HtmlExtractorStatement, SqlStatement, WorkflowBlockExecuteResult, WorkflowHttpMethod
    },
    modeling::Value,
};

use crate::workflow::context::WorkflowContext;

pub async fn execute(
    statement: &DataOperatorStatement,
    context: Arc<Mutex<WorkflowContext>>,
) -> anyhow::Result<WorkflowBlockExecuteResult> {
    //获取请求的方法
    return data_connector::execute(statement, context).await;
}

pub async fn sql_execute(
    statement: &SqlStatement,
    context: Arc<Mutex<WorkflowContext>>,
) -> anyhow::Result<WorkflowBlockExecuteResult> {
    //获取请求的方法
    return sql::execute(statement, context).await;
}
